﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using MVC4CodeSamples.Areas.HTMLHelpers.Models;

namespace MVC4CodeSamples.Areas.HTMLHelpers.Controllers
{
    public class HTMLHelperSampleController : Controller
    {
        //
        // GET: /HTMLHelpers/HTMLHelperSample/

        public ActionResult Index(string helper)
        {
            ViewBag.helper = helper;
            return View("StandardHtmlHelpers");
        }
        public ActionResult StandardHtmlHelpers(string helper)
        {
            ViewBag.helper = helper;
            return View("StandardHtmlHelpers");
        }
        ///GET: /HTMLHelpers/ModelDemo/
        public ActionResult ModelDemo()
        {

            var model = new EmployeeDBContext().Employees;
            return View("ModelDemo", model);
        }

        ///GET: /HTMLHelpers/StronglyTyped/
        public ActionResult StronglyTyped()
        {

            var model = new EmployeeDBContext().Employees;
            return View("StronglyTypedHTMLHelpers", model);
        }

        ///GET: /HTMLHelpers/Templated/
        public ActionResult  Templated()
        {

            var model = new EmployeeDBContext().Employees.First();
            return View("TemplatedHTMLHelpers", model);
        }

        ///GET: /HTMLHelpers/InlineHelper/
        public ActionResult InlineHelper()
        {
            return View("InlineHTMLHelper");
        }

        ///GET: /HTMLHelpers/CustomHelper/
        public ActionResult CustomHelper()
        {
            return View("CustomHTMLHelper");
        }
       
    }
}
